package jmind.core.taglib;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

import com.alibaba.fastjson.JSON;

/**
 *  <m:json var="" />
 * @author xieweibo
 * @date 2016年3月31日
 */
public class JSONTag extends SimpleTagSupport {

    private Object var;

    public Object getVar() {
        return var;
    }

    public void setVar(Object var) {
        this.var = var;
    }

    public void doTag() throws JspException, IOException {
        getJspContext().getOut().print(JSON.toJSONString(var));
    }

}
